<div class="top"><h2><?php echo __d('competitions','Rating based on ').$rating_total.__d('competitions',' reviews',true)?></h2></div>
	<div class="content">	
	
	<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
	  <style>
	  .ui-progressbar { 
		height: .603em;
		width: 82px;
		overflow: hidden;
		text-align: left;
		margin-left: 20px;
		}
		
		.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { 
		border-bottom-right-radius: 2px;
		}
		.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { 
		border-bottom-left-radius: 2px;
		}
		.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { 
		border-top-right-radius: 2px;
		}
		.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { 
		border-top-left-radius: 2px;
		}
	  </style>
	
			<?php foreach ($rating_values as $group_id => $ratings_value) {?>
			<div class="grid_3 omega alpha">
				<div class="rating-list grid_2 omega alpha">
					<h2><?php echo __d('competitions','The hottest ranking categories').' ('.$rating_groups[$group_id].')'; ?></h2>
					<?php foreach ($ratings_value as $rating_id => $r) {?>
	
					<div class ="grid_1 omega alpha">
						<div class='clear'>&nbsp;</div>	
						<h4 style="padding: 10px 0px 0px 20px; margin: 0px; line-height: 10px; font-size: 70%; font-weight: bold;"><?php echo $this->Html->link($r['article_name'],'/a/'.$r['article_slug'],array('class'=>'rating-article-name'))?></h4>
						<div style="font-size: 80%; line-height: 18px; padding-left: 20px;">			
								<input name="data[Rating][<?php echo $rating_id?><?php echo $article_id?>]" type="radio" class="star<?php echo $article_id?>" value="1" title="<?php echo __d('competitions','Terrible',true)?>" disabled="disabled" <?php if($r['serd'] <= 1){?>checked="checked"<?php }?>/>
								<input name="data[Rating][<?php echo $rating_id?><?php echo $article_id?>]" type="radio" class="star<?php echo $article_id?>" value="2" title="<?php echo __d('competitions','Poor',true)?>" disabled="disabled" <?php if($r['serd'] >= 2){?>checked="checked"<?php }?>/>
								<input name="data[Rating][<?php echo $rating_id?><?php echo $article_id?>]" type="radio" class="star<?php echo $article_id?>" value="3" title="<?php echo __d('competitions','Average',true)?>" disabled="disabled" <?php if($r['serd'] >= 3){?>checked="checked"<?php }?>/>
								<input name="data[Rating][<?php echo $rating_id?><?php echo $article_id?>]" type="radio" class="star<?php echo $article_id?>" value="4" title="<?php echo __d('competitions','Very Good',true)?>" disabled="disabled" <?php if($r['serd'] >= 4){?>checked="checked"<?php }?>/>
								<input name="data[Rating][<?php echo $rating_id?><?php echo $article_id?>]" type="radio" class="star<?php echo $article_id?>" value="5" title="<?php echo __d('competitions','Excellent',true)?>" disabled="disabled" <?php if($r['serd'] >= 5){?>checked="checked"<?php }?>/>
								&nbsp;&nbsp;
								<?php 
									$opis =  __d('competitions','Terrible',true);
									if($r['serd'] >= 1) $opis =  __d('competitions','Terrible',true);
									if($r['serd'] >= 2) $opis = __d('competitions','Poor',true);
									if($r['serd'] >= 3) $opis = __d('competitions','Average',true);
									if($r['serd'] >= 4) $opis = __d('competitions','Very Good',true);
									if($r['serd'] >= 4.6) $opis = __d('competitions','Excellent',true);
									echo $opis;
								?>										
						</div>
						<div class='clear'>&nbsp;</div>
						<span class="rating-name"><?php echo $ratings[$rating_id]?></span>
						
					</div>
					<?php }?>
					<div class='clear'>&nbsp;</div>	
				</div>	
				<div class="rating-list comments_inner grid_1 omega alpha">
					<h2><?php echo __d('competitions','Top 5 ').' '.$rating_groups[$group_id]; ?></h2>
					<?php //debug($best_articles[$group_id])?>
					<?php 
						$j = 1;
						foreach ($best_articles[$group_id] as $i => $value) {?>
						<div class="new_item"> <?php echo $this->Html->link($j.'. '. $value['Article']['name'],'/a/'.$value['Article']['slug'],array('class'=>'best-article'))?></div>
					<?php $j++;}?>
				</div>
			</div>
			<?php } ?>
					
	
	<div class='clear'>&nbsp;</div>								
	</div>
<div class='clear'>&nbsp;</div>
<div class="bottom"></div>